package com.nanyang.tms.api.dto.request.waybill;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nanyang.common.core.domain.ApiRequest;

import lombok.Data;

@Data
public class WaybillAddReuqest extends ApiRequest{
	private static final long serialVersionUID = 1L;
	@NotEmpty(message = "公司编码不能为空")
	private String companyCode;
	@NotEmpty(message = "收货编码不能为空")
    private String receiptCode;
	@NotEmpty(message = "服务商单号不能为空")
	private String supplierNo;
	@NotEmpty(message = "销售产品编码不能为空")
	private String saleProductCode;
	@NotEmpty(message = "货物类型编码不能为空")
	private String  cargoTypeCode;
	@NotEmpty(message = "货物类型名称不能为空")
	private String  cargoTypeName;
	@NotEmpty(message = "目的国家不能为空")
	private String countyCode;
	@NotEmpty(message = "州省不能为空")
	private String provinceCode;
	@NotNull(message = "件数不能为空")
	@Min(value=1,message = "件数必须大于0")
	private Integer totalNum;
	@Valid
	@NotNull(message = "材积信息不能为空")
	@Size(min = 1, message = "至少要有一个材积信息")
	private List<WaybillVolumeReuqest> volumes;
	@JsonIgnore
	private String ip;
	@JsonIgnore
	private String pin;
	
	@Override
	public void requestCheck() {
		
	}

}
